class AdminConstraint
  def matches?(request)
    user = User.find_by_id(request.session[:current_user_id])
    user #&& user.username=='admin'
  end
end